/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package music;

import java.io.File;
import java.util.TreeMap;
import music.types.MidiNote;

/**
 *
 * @author TJ
 */
public class Instrument implements Comparable{
    private String name,displayName;
    private int midiProgram;
    private int channel;
    public Instrument(String n,int prog) {
        name=n;
        midiProgram=prog;
    }
    public Instrument(String n,int prog,int channel) {
        name=n;
        midiProgram=prog;
        this.channel=channel;
    }
    public void setChannel(int i) {channel=i;}
    public int getProgram(){return midiProgram;}
    public int getChannel(){return channel;}
    public void setDisplayName(String n){displayName=n;}
    public String getDisplayName(){if(displayName==null)return name; return displayName;}
    public void resetDiplayName() { displayName=name;}
    public String getName(){return name;}
    @Override
    public String toString(){return getDisplayName();}
    @Override
    public int compareTo(Object o) {
        return this.getName().compareTo(((Instrument)o).getName());
    }
}
